/**
 * @author Anna-Katharina Wickert 
 * @author Yannic Remmet
 * @author Tobias Trabelsi
 * 
 * @version 
 * @since 27.07.2012
 *
 * @license Beer-Ware License (Revision 42)
 *
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * We wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy us a beer in return.
 * ----------------------------------------------------------------------------
 */
package model;

import java.util.Date;
import java.util.Enumeration;

import javax.swing.tree.TreeNode;

public class TreeItem extends TreeElement {

	
	private static final long serialVersionUID = 5332895577893645770L;
	public TreeItem(){
		this("");
	}
	public TreeItem(String s){
		this(s,null,0,new Date(),"","",false);
	}
	public TreeItem(String title, TreeElement parent, int prio,Date date, String author, String text, Boolean done) {
		super(title, parent);
		this.date = date;
		this.author = author;
		this.text = text;
		this.done = done;
		this.prio = prio;
		
	}

	
	Date date;
	String author;
	int prio;
	String text;
	boolean done;

	@Override
	public boolean addChild(TreeElement node) {
		return false;
	}
	@Override
	public TreeElement getChildAt(int childIndex) {
		return null;
	}
	@Override
	public boolean hasChildren() {
		return false;
	}
	@Override
	public int getChildCount() {
 		return -1;
	}
	@Override
	public int getIndex(TreeElement node) {
		return -1;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public int getPrio() {
		return prio;
	}
	public void setPrio(int prio) {
		this.prio = prio;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public boolean isDone() {
		return done;
	}
	public void setDone(boolean done) {
		this.done = done;
	}
	@Override
	public int getIndex(TreeNode node) {
		return -1;
	}
	@Override
	public boolean del(TreeElement node) {
		return false;
	}
	@Override
	public Enumeration<TreeElement> children() {
		return null;
	}
	@Override
	public int compareTo(TreeElement o) {
		if (o instanceof TreeGroup)
			return 1;
		return this.toString().compareTo(o.toString());
	}

}
